<?php

class product extends cls_parent {

    private $tbl1 = "products";

    public function getProducts() {
        $sql = "SELECT * FROM products";
        return $this->db->fetchAll($sql);
    }

    public function addProduct($data = array()) {
        $this->db->prepareInsert($data);
        $this->db->insert($this->tbl1);
    }
    
    public function getProduct($i) {
        $sql = "SELECT * FROM products where pro_id=$i";
        return $this->db->fetchOne($sql);
    }

}

?>
